package cn.tedu.egmybatis2.mapper;

import cn.tedu.egmybatis2.polo.entity.Product;

import org.apache.ibatis.annotations.*;

import java.util.List;
@Mapper
public interface ProductMapper {
    //@Insert("INSERT INTO product(id,title,price,stock) VALUES(#{id},#{title},#{price},#{stock}")
    int insertProduct(Product product);
   //@Update("update product set id=#{id},title=#{title},price=#{price},stock=#{stock} where title=#{title}")
    int updateProduct(Product product);

    //@Delete("delete title from product where title=#{title}")
     int deleteProduct(Product product);

    //@Select("select title price from product where title=#{title}")
    Product selectProduct(String title);
}
